package holdem.workingMemory;

import java.lang.reflect.*;
import java.util.*;

/**
 *
 * @author Pai Qi
 * @author qipai0@gmail.com
 * Description: A set of methods used by GUI for easy reference
 * when making rules
 * Start Date: 28 Oct 2010
 *
 * All methods in the set need to be public and start with "wm_"
 */

public abstract class ReferenceMethodSet {
    public final String methodPrefix = "wm_";
    public List<Method> getAllSetMethods() {
        Method[] m = this.getClass().getMethods();
        List<Method> methods = new ArrayList<Method>();
        for(int i = 0; i < m.length; i++) {
            if(m[i].getName().startsWith(methodPrefix)) {
                methods.add(m[i]);
            }
        }

        /*
        Class returnType = methods.get(0).getReturnType();
        Class parameterTypes = methods.get(0).getParameterTypes();
         */
        return methods;
    }
}
